\hypertarget{class_interfaces}{
\section{Interfaces Class Reference}
\label{class_interfaces}\index{Interfaces@{Interfaces}}
}


Text Interface with a user.  




{\ttfamily \#include $<$Interfaces.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_interfaces_aaa1efab5b741bef2d5ab2bfd7e55631a}{Interfaces} ()
\item 
\hyperlink{class_interfaces_af06151cdd31ccea668776b83b57dc913}{$\sim$Interfaces} ()
\item 
void \hyperlink{class_interfaces_ae48fc98505266b512946431d96c54e21}{link} (\hyperlink{class_data_storage}{DataStorage} $\ast$pData)
\item 
void \hyperlink{class_interfaces_af35a103bc29738c6caad70f17aceff55}{sms} (string mensagem)
\item 
string \hyperlink{class_interfaces_a4a19ce74ac447c6e5b2062b6d3cf20f3}{smsWithReply} (string pergunta)
\item 
string \hyperlink{class_interfaces_a7e3f48ca9a1089ad669eaae9ab264860}{smsWithNumericReply} (string pergunta)
\item 
void \hyperlink{class_interfaces_a50464f05e5eaadc14eb15f75a42f14b6}{clrScr} ()
\item 
void \hyperlink{class_interfaces_ad470c7fc824b35fd441b60f97d3ae6e3}{menuInABox} (vector$<$ string $>$ \&opcoes, char vertical= '$\ast$', char horizontal= '$\ast$')
\item 
void \hyperlink{class_interfaces_a21c072436ef30d045dd5e22ddf13a8a2}{help} (string menu)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Text Interface with a user. 

Bundle of methods that allow to standardize the interaction with the user using a text interface. There's function to send simple messages with and without a reply, texts with several lines.

EXAMPLE USES ============ 1. Sent single message (no return): sms(msg);

2. Send message and expect result: string = smsWithReply(msg);

3. Send message and expect numeric result: string = smsWithNumericReply(msg);

4. Show several lines of text in a frame: vector$<$string$>$ lines; lines.push\_\-back(line); menuInABox(lines);

5. Show several lines of text in a frame and asks for user input: Follow instructions for 4, them 2 or 3 as needed.

6. Make some space for a new user interaction: \hyperlink{class_interfaces_a50464f05e5eaadc14eb15f75a42f14b6}{clrScr()};

7. Show some predefined text according to one or more keywords: help(keywords); 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_interfaces_aaa1efab5b741bef2d5ab2bfd7e55631a}{
\index{Interfaces@{Interfaces}!Interfaces@{Interfaces}}
\index{Interfaces@{Interfaces}!Interfaces@{Interfaces}}
\subsubsection[{Interfaces}]{\setlength{\rightskip}{0pt plus 5cm}Interfaces::Interfaces (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_aaa1efab5b741bef2d5ab2bfd7e55631a}
The constructor. \hypertarget{class_interfaces_af06151cdd31ccea668776b83b57dc913}{
\index{Interfaces@{Interfaces}!$\sim$Interfaces@{$\sim$Interfaces}}
\index{$\sim$Interfaces@{$\sim$Interfaces}!Interfaces@{Interfaces}}
\subsubsection[{$\sim$Interfaces}]{\setlength{\rightskip}{0pt plus 5cm}Interfaces::$\sim$Interfaces (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_af06151cdd31ccea668776b83b57dc913}
A simple destructor. 

\subsection{Member Function Documentation}
\hypertarget{class_interfaces_a50464f05e5eaadc14eb15f75a42f14b6}{
\index{Interfaces@{Interfaces}!clrScr@{clrScr}}
\index{clrScr@{clrScr}!Interfaces@{Interfaces}}
\subsubsection[{clrScr}]{\setlength{\rightskip}{0pt plus 5cm}void Interfaces::clrScr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_a50464f05e5eaadc14eb15f75a42f14b6}
Just prints some empty lines to separate the text from different user interactions. \hypertarget{class_interfaces_a21c072436ef30d045dd5e22ddf13a8a2}{
\index{Interfaces@{Interfaces}!help@{help}}
\index{help@{help}!Interfaces@{Interfaces}}
\subsubsection[{help}]{\setlength{\rightskip}{0pt plus 5cm}void Interfaces::help (
\begin{DoxyParamCaption}
\item[{string}]{menu}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_a21c072436ef30d045dd5e22ddf13a8a2}
A help menu, the text to be used is based on the string received, allowing for a context sensitive feature. help(text) \hypertarget{class_interfaces_ae48fc98505266b512946431d96c54e21}{
\index{Interfaces@{Interfaces}!link@{link}}
\index{link@{link}!Interfaces@{Interfaces}}
\subsubsection[{link}]{\setlength{\rightskip}{0pt plus 5cm}void Interfaces::link (
\begin{DoxyParamCaption}
\item[{{\bf DataStorage} $\ast$}]{pData}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_ae48fc98505266b512946431d96c54e21}
Method to link data to the interface, receives a pointer to the class that is providing access to the application data. This allows the interface to view the data, without the need to pass it as arguments of the methods. 

Permite passar uma referência dos dados para a Interface 

\hypertarget{class_interfaces_ad470c7fc824b35fd441b60f97d3ae6e3}{
\index{Interfaces@{Interfaces}!menuInABox@{menuInABox}}
\index{menuInABox@{menuInABox}!Interfaces@{Interfaces}}
\subsubsection[{menuInABox}]{\setlength{\rightskip}{0pt plus 5cm}void Interfaces::menuInABox (
\begin{DoxyParamCaption}
\item[{vector$<$ string $>$ \&}]{linhasDoMenu, }
\item[{char}]{vertical = {\ttfamily '$\ast$'}, }
\item[{char}]{horizontal = {\ttfamily '$\ast$'}}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_ad470c7fc824b35fd441b60f97d3ae6e3}
Show several options (each one on it's own line) all inside a box frame. No values returned. menuInABox(strings, a, b)

where: strings is a vector of strings, each one is to be printed in it's own line. a is the character to be used on the left and right sides of frame. b is the character to be used on top and bottom sides of frame.

If a string is \char`\"{}separator\char`\"{} it's printed a line of character a instead of the text. \hypertarget{class_interfaces_af35a103bc29738c6caad70f17aceff55}{
\index{Interfaces@{Interfaces}!sms@{sms}}
\index{sms@{sms}!Interfaces@{Interfaces}}
\subsubsection[{sms}]{\setlength{\rightskip}{0pt plus 5cm}void Interfaces::sms (
\begin{DoxyParamCaption}
\item[{string}]{mensagem}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_af35a103bc29738c6caad70f17aceff55}
To send a single message to the user (a warning for example) not expecting any return: sms(message) \hypertarget{class_interfaces_a7e3f48ca9a1089ad669eaae9ab264860}{
\index{Interfaces@{Interfaces}!smsWithNumericReply@{smsWithNumericReply}}
\index{smsWithNumericReply@{smsWithNumericReply}!Interfaces@{Interfaces}}
\subsubsection[{smsWithNumericReply}]{\setlength{\rightskip}{0pt plus 5cm}string Interfaces::smsWithNumericReply (
\begin{DoxyParamCaption}
\item[{string}]{pergunta}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_a7e3f48ca9a1089ad669eaae9ab264860}
Ask a simple question to the user and receive a reply (as a string): smsWithNumericReply(message) \hypertarget{class_interfaces_a4a19ce74ac447c6e5b2062b6d3cf20f3}{
\index{Interfaces@{Interfaces}!smsWithReply@{smsWithReply}}
\index{smsWithReply@{smsWithReply}!Interfaces@{Interfaces}}
\subsubsection[{smsWithReply}]{\setlength{\rightskip}{0pt plus 5cm}string Interfaces::smsWithReply (
\begin{DoxyParamCaption}
\item[{string}]{pergunta}
\end{DoxyParamCaption}
)}}
\label{class_interfaces_a4a19ce74ac447c6e5b2062b6d3cf20f3}
Ask a simple question to the user and receive a reply (as a string): smsWithReply(message) 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_interfaces_8h}{Interfaces.h}\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_interfaces_8cpp}{Interfaces.cpp}\end{DoxyCompactItemize}
